package com.yisu.auction.manager.website.controller;

import com.yisu.auction.manager.domain.util.Constants;
import com.yisu.auction.manager.domain.vo.employeePackageVos.EmployeeVo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by LKL on 2016/9/12.
 */
@Controller
public class MainController extends BaseController{


    @RequestMapping(value = "/index.htm")
    public void index(){
        logger.info("Go to index page...");
    }

    @RequestMapping(value = "/main.htm")
    public void mainPage(HttpServletRequest request, Model model){
        logger.info("Go to main page...");

        EmployeeVo employee = (EmployeeVo) request.getSession().getAttribute(Constants.USER_INFO_KEY);
        model.addAttribute("employee", employee);
    }

}
